<?php if(!empty($inmu_data)){ ?>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="page-header">
            <h3><?php echo $inmu_data->desc_tinmue.' - '.$inmu_data->desc_tope; if(!empty($precio)){echo ' - '.'<span class="text-warning">'.$precio.'</span>';} ?> <small><?php echo 'Ingreso: '.$inmu_data->fecha_ingreso.' | Código: '.$inmu_data->codigo_inmu; ?></small></h3>
        </div>
    </div>
    <div class="container-fluid">
        <div class="row-fluid">
            <?php if(!empty($inmu_img)){ ?>
            <div class="span12">
                <?php
                if(!empty($inmu_img_small)){
                    $name_pic = $inmu_img_small->name_img;
                    $source_image = base_url().'web/img/small/';
                    $path_image_orig  = base_url().'web/img/inmu/';
                    
                    $image_properties = array(
                        'src' => $source_image.$name_pic ,
                        'alt' => $name_pic,
                        'style' => 'width : 400px; height: 400px;',
                        'title' => $name_pic,
                        'class' => 'img-polaroid',
                        'id'    => 'zoom',
                        'data-zoom-image' => $path_image_orig.$name_pic,
                        );
                    }
                    echo img($image_properties); ?>
            </div>
            <div class="span12"></div>
            <div id="galeria" class="span11">
                <ul class="inline">
                    <?php
                    foreach ($inmu_img as $img){
                        $path_image_th = 'web/img/mini/';
                        $path_image_small = base_url().'web/img/small/';
                        $path_image_orig  = base_url().'web/img/inmu/';
      
                        $id_img = $img->id_img;
                        $name_img = $img->name_img;
                        $image_properties = array(
                            'src' => $path_image_th.$name_img ,
                            'alt' => $id_img,
                            'style' => 'width : 120px; height: 120px;',
                            'title' => $name_img,
                            'class' => 'img-polaroid',
                            'id'    => 'zoom',
                            );
                    ?>
                    <li>
                        <a class="thumbnail" href="#" data-image="<?php echo $path_image_small.$name_img ?>" data-zoom-image="<?php echo $path_image_orig.$name_img?>">
                            <?php echo img($image_properties);?>
                        </a>
                    </li>
                    <?php } ?>
                </ul>
            </div>   
             <?php }else{
                    $path_image = 'web/img/';
                    $name_img = 'no_img.jpg';
                    $image_properties = array(
                        'src' => $path_image.$name_img ,
                        'style' => 'width : 120px; height: 120px;',
                        'title' => $name_img,
                        'class' => 'img-polaroid',
                        );
             ?>
            <div class="span12">
                <?php echo img($image_properties);?>
            </div>
            <div class="span12"></div>
                <?php } ?>
        </div>
    </div>
    <div class="container-fluid">
        <div class="row-fluid">
            <div class="span12 well">
                <p class="muted">Título de la publicacion en Web: </p><?php echo $inmu_data->titulo_inmu; ?>
                <p class="muted">Descripción: </p><?php echo $inmu_data->desc_inmu; ?>
            </div>
        </div>
    </div>
    <div class="container-fluid">
        <div class="row-fluid">
            <div class="span8">
                <?php echo $map['html']; ?>
            </div>
            <div class="span4">
                <h3 class="muted">Ubicación</h3>
                <address>
                    <?php echo $ubicacion; ?>
                </address>
            </div>
        </div>
    </div>
    <div class="span12"></div>
    <div class="container-fluid">
        <div class="row-fluid">
            <div class="span12">
                <table class="table table-bordered table-striped">
                    <caption><h4 class="muted">Características Generales</h4></caption>
                    <thead>
                        <tr>
                            <th>Sup.Total(m2)</th>
                            <th>Sup.Cubierta(m2)</th>
                            <th>Total Amb.</th>
                            <th>Orientación</th>
                            <th>Disposición</th>
                            <th>Iluminación</th>
                            <th>Estado Gral.</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td><?php echo $inmu_data->suptotal_inmu ?></td>
                            <td><?php echo $inmu_data->supcubierta_inmu ?></td>
                            <td><?php echo $inmu_data->total_amb ;?></td>
                            <td><?php echo $inmu_data->orie_desc ;?></td>
                            <td><?php echo $inmu_data->desc_dispo ;?></td>
                            <td><?php echo $inmu_data->desc_lumi ;?></td>
                            <td><?php echo $inmu_data->desc_estainmu ;?></td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <div class="container-fluid">
        <div class="row-fluid">
            <?php if(!empty($inmu_amb)){ ?>
            <div class="span3">
                <table class="table table-bordered table-striped">
                    <thead>
                        <tr>
                            <th>Ambientes</th>
                        </tr>
                    </thead>
                    <tbody>
                       <?php foreach ($inmu_amb as $amb){ ?>
                        <tr>
                            <td>
                                <i class="icon-ok"></i> <?php echo $amb->desc_amb; ?>
                            </td>
                        </tr>
                       <?php } ?>
                    </tbody>
                </table>
            </div>
            <?php }
            if(!empty($inmu_adic)){ ?>
            <div class="span3">
                <table class="table table-bordered table-striped">
                    <thead>
                        <tr>
                            <th>Adicionales</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php foreach ($inmu_adic as $adic){ ?>
                        <tr>
                            <td>
                                <i class="icon-ok"></i> <?php echo $adic->desc_adic; ?>
                            </td>
                        </tr>    
                        <?php } ?>
                    </tbody>
                </table>
            </div>
            <?php } 
            if(!empty($inmu_serv)){ ?>
            <div class="span3">
                <table class="table table-bordered table-striped">
                    <thead>
                        <tr>
                            <th>Servicios</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php foreach ($inmu_serv as $serv){ ?>
                        <tr>
                            <td>
                                <i class="icon-ok"></i> <?php echo $serv->desc_serv; ?>
                            </td>
                        </tr>
                        <?php } ?>
                    </tbody>
                </table>
            </div>
            <?php }?>
        </div>
    </div>
<?php }else{ ?>
    <div class="container-fluid">
        <div class="row-fluid">
            <div class="span12">
                <div class="alert alert-error">
                     No se pudo recuperar la informacion del inmueble que desea ver. intentelo mas tarde...
                </div>
            </div>
        </div>
    </div>
<?php } ?>
